package com.dog.basics.api.security;

import com.dog.basics.security.token.MyAuthenticationToken;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * 二维码Token
 */
@Getter
@Setter
@NoArgsConstructor
public class MiniAppAuthenticationToken extends MyAuthenticationToken {

    /**
     * Openid微信标识
     */
    private String openId;

    /**
     * unionId
     */
    private String unionId;

    /**
     * 0:设备小程序 1:商城小程序
     */
    private Integer type;
    /**
     *微信获取的手机号
     */
    private String mobile;

    public MiniAppAuthenticationToken(UserDetails principal, Object credentials) {
        super(principal, credentials, principal.getAuthorities());
    }
}
